Skip to content

Take a constant with a minus written in it out of a fractional power for either sign - #1986

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
take-a-negated-constant-out-of-a-fractional-power-for-either-sign
Oct 21, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
take-a-negated-constant-out-of-a-fractional-power-for-either-sign

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

DistributeAFractionalPower writes (c g)^b as c^b g^b provided c > 0. For c = -k that arm is k < 0, so (a + b tan(x))/sqrt(-k tan(x)) was answered for k < 0 only. The integrand is real for k > 0 too, wherever tan(x) < 0, and there the answer had no value.

Where exactly one symbolic constant comes out and a negative number is written in it, the rule now also takes it out as (-c)^b (-g)^b with -c > 0, which holds on the principal branch for any g. The answer is the piecewise of the two arms. A constant written without a minus, as in sqrt(b sec(x)) or sqrt(a - a sin(x)), keeps its one arm, which leaves solved rows as they are. Widening this to every symbolic constant would add a second arm to every existing provided c > 0 answer, and is not done here.

Measured on 8270086f, branch against master:

Run Problems Master Branch
Pocket: Rubi's 4.1, 4.3 and 4.5, sampled 2,144 1,996 solved 1,997 solved
Family 1, 40 a file 1,381 1,368 1,368
Family 0, whole 1,814 1,789 1,789
Families 2 to 8, sampled 2,410 2,380 2,381

Re-run alone, 4.3.2.1:670 goes from an answer for one sign to a verified answer, in 186 ms. The other two moves, 4.3.1.2:109 and 7.4.1:369, come out the same on both builds.

sqrt(-k tan(x)), 1/sqrt(-k tan(c+dx)), (-k cot(x))^(3/2) and their kin are answered at both signs; master answers each only for k < 0. Quadrature agrees on intervals where -k tan(x) > 0: for k = 0.9 on [1.4, 2.5], and for k = -0.9 on [0.1, 1.1].

Of 300 solved neighbours with a symbolic constant under a fractional power, every one answers as before, character for character. None of the problems answered on both builds allocates more on the branch. No run had a wrong answer.

ANegatedConstantTakenOutOfAFractionalPowerIntegralTest differentiates the answers back at both signs of k. BREAKING-CHANGES.md has the entry, with the 2.5.0 column measured on v2.5.0.

Part of #233.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

…for either sign

DistributeAFractionalPower writes (c g)^b as c^b g^b provided c > 0. For
c = -k that arm is k < 0, so (a + b tan(x))/sqrt(-k tan(x)) was answered for
k < 0 only, though the integrand is real for k > 0 wherever tan(x) < 0.
Where exactly one symbolic constant comes out and a negative number is
written in it, the rule also takes it out as (-c)^b (-g)^b with -c > 0,
which holds on the principal branch for any g, and the answer is the
piecewise of the two arms. A constant written without a minus, as in
sqrt(b sec(x)) or sqrt(a - a sin(x)), keeps its one arm.

Rubi's 4.3.2.1:670 is answered for both signs of k, checked by quadrature on
an interval where -k tan(x) > 0 for each. 300 solved neighbours with a
symbolic constant under a fractional power answer as before, character for
character.

Part of #233.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
@Rafael-SOWNet Rafael-SOWNet added this to the 2.6.0 milestone Oct 21, 2026
@Rafael-SOWNet
Rafael-SOWNet merged commit 20c464f into master Oct 21, 2026
34 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in AngouriMath Oct 21, 2026
@Rafael-SOWNet
Rafael-SOWNet deleted the take-a-negated-constant-out-of-a-fractional-power-for-either-sign branch October 29, 2026 00:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant